/*
 * Copyright 2008-2009 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package ssn.daily.service.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import ssn.daily.vo.DailyPreVO;
import ssn.daily.vo.DailyVO;
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;


/**  
 * @Class Name : 
 * @Description : 
 * @Modification Logrmation  
 * @
 * @  수정일      수정자              수정내용
 * @ ---------   ---------   -------------------------------
 * 
 * @since 2013. 09.30
 * @version 1.0
 * @see
 */
@SuppressWarnings("rawtypes")
@Repository("dailyDAO")
public class DailyDAO extends EgovAbstractDAO {

	public String selectDailyLogPk() throws Exception{
		return (String)getSqlMapClientTemplate().queryForObject("selectDailyLogPk");
	}
	public String selectDailyInvenLogPk(String parentKey) throws Exception{
		return (String)selectByPk("selectDailyInvenLogPk", parentKey);
	}
	public String selectDailyMachineLogPk(String parentKey) throws Exception{
		return (String)selectByPk("selectDailyMachineLogPk", parentKey);
	}
	public void insertDailyLog(DailyVO vo) throws Exception{
		insert("insertDailyLog", vo);
	}
	public void insertDailyInvenLog(DailyVO vo) throws Exception{
		insert("insertDailyInvenLog", vo);
	}
	public void insertDailyMachineLog(DailyVO vo) throws Exception{
		insert("insertDailyMachineLog", vo);
	}
	public void updateDailyLog(DailyVO vo) throws Exception{
		update("updateDailyLog", vo);
	}
	public void updateStatusDailyLog(DailyVO vo) throws Exception{
		update("updateStatusDailyLog", vo);
	}
	public List selectDailyList(DailyVO vo) throws Exception{
		return list("selectDailyList", vo);
	}
	public int selectDailyListCnt(DailyVO vo) throws Exception{
		return Integer.parseInt(selectByPk("selectDailyListCnt", vo).toString());
	}
	public DailyVO selectDailyLog(DailyVO vo) throws Exception{
		return (DailyVO)selectByPk("selectDailyLog", vo);
	}
	public DailyPreVO selectDailyPreLog(DailyVO vo) throws Exception{
		return (DailyPreVO)selectByPk("selectDailyPreLog", vo);
	}
	public List selectDailyInvenLogList(String parentKey) throws Exception{
		return list("selectDailyInvenLog", parentKey);
	}
	public List selectDailyFirstInven() throws Exception{
		return getSqlMapClientTemplate().queryForList("selectDailyFirstInven");
	}
	public List selectDailyMachineLogList(String parentKey) throws Exception{
		return list("selectDailyMachineLog", parentKey);
	}
	public void deleteDailyInven(String parentKey) throws Exception{
		delete("deleteDailyInven", parentKey);
	}
	public void deleteDailyMachine(String parentKey) throws Exception{
		delete("deleteDailyMachine", parentKey);
	}
	public List selectDailyChart(DailyVO vo) throws Exception{
		return list("selectDailyChart", vo);
	}
	public List selectDailySludge(DailyVO vo) throws Exception{
		return list("selectDailySludge", vo);
	}
	public String selectDailyAttachFile(String sdl_dlog_key) throws Exception{
		return (String)selectByPk("selectDailyAttachFile", sdl_dlog_key);
	}
	public void deleteDailyAttachFile(String sdl_dlog_key) throws Exception{
		update("deleteDailyAttachFile", sdl_dlog_key);
	}
}
